Ext.define('AM.view.YearProcedureView', {
		extend: 'Ext.grid.Panel',
		alias : 'widget.yearProcedureView',
//		store : 'MyJobStore',
//		frame:true,
		columnLines:true,
//		 height: 300,
//		dockedItems: [{
//        xtype: 'pagingtoolbar',
//        dock: 'bottom',
//        store : 'MyJobStore',
//        displayInfo: true
//    }],
		plugins: [{
            ptype: 'rowexpander',
            rowBodyTpl : new Ext.XTemplate(
                '<p><b>要求:</b> {jobRequirement}</p>',
                '<p><b>备注:</b> {remark}</p><br>'    
            )
        }],
		columns: [
			        { text: '序号', width:50,align:'center', xtype: 'rownumberer'},
			        { text: '名称', dataIndex: 'name', width:50,align:'center'},
			        { text: '得分',dataIndex: 'core', width:50,align:'center' },
			        { text: '状态', dataIndex: 'state',  width:80,align:'center',renderer: function(value){
								 if (value === 2) {
										 return '办理中';
								 }if (value ===1) {
										 return '未办理';
								 }if (value === 3) {
										 return '结束';
								 }	
						}					 
			        },
			        { text: '要求', dataIndex: 'jobRequirement', width:60,align:'center'},
//			        { text: '备注',dataIndex: 'remark', width:80,align:'center' },
			        { text: '操作', dataIndex: 'id',width:180,align:'center',renderer : function(data, cell, record, rowIndex,columnIndex){			        	
			        	    var resultStr = "<div class='controlBtn'>" +     
                            "<a href='javascript:void("+record.get('id')+");'class='alarm_detail'onclick='banLiJob("+record.get('id')+")'>办理任务</a>&nbsp;&nbsp;&nbsp;&nbsp;" +     
                            "<a href='javascript:void("+record.get('id')+");' class='alarm_detail'onclick='wanchengJob("+record.get('id')+")'>完成任务</a>&nbsp;&nbsp;&nbsp;&nbsp;"+ 
                             "<a href='javascript:void("+record.get('id')+");'class='alarm_detail'onclick='addRemark("+record.get('id')+")'>添加备注</a>&nbsp;&nbsp;&nbsp;&nbsp;"   
//                            "<a href='javascript:void("+record.get('id')+");' class='alarm_detail'onclick='addAdvice("+record.get('id')+")'>建议</a>"  
                            "</div>";     
         					return resultStr;  
			       		  }
         	    	}
			     ]

})